Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handle character boundary in search mode #18928

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

roife
Copy link
Member

@roife roife commented Jan 12, 2025

fix #18918

I also used Clippy to scan and check usages of slicing in the project, and found that only here could cause a panic.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 12, 2025
@ChayimFriedman2
Copy link
Contributor

There is another slicing that looks like it may panic in line 305 (let prefix = &candidate[..query.len()];).

But do you know why it panics? We use match_indices(), it should return a correct index.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug Report: Panic When Using Japanese Function Names in Rust Analyzer(boundary issue)
3 participants